<template>
  <div>
    <div class="style2-actions clearfix mgt10">
      <div class="style2-actions-title">我的服务</div>
      <div v-if="is_zrkj_dz" @click="handleLinkTo('shareCouponList')" class="action">
        <span class="icon-action icon2_30"></span>
        <span class="title">分享中心</span>
      </div>
      <div @click="Jump('agentList')" v-if="fxsInfo.show_fxSubject" class="action">
        <span class="icon-action icon2_1"></span>
        <span class="title">{{fxsInfo.ftitle_magazine}}</span>
      </div>
      <div @click="Jump('myCommission','fxs')" v-if="fxsInfo.show_myCommission" class="action">
        <span class="icon-action icon2_9"></span>
        <span class="title">{{fxsInfo.ftitle_commission}}</span>
      </div>
      <div
        @click="Jump('commissionSort')"
        v-if="fxsInfo.display_agent_sort && fxsInfo.show_monthRank"
        class="action"
      >
        <span class="icon-action icon2_10"></span>
        <span class="title">{{fxsInfo.ftitle_ranking}}</span>
      </div>
      <div
        @click="Jump('store')"
        v-if="!fxsInfo.is_app_open && fxsInfo.is_store_log == 1 && fxsInfo.show_myStore"
        class="action"
      >
        <span class="icon-action icon2_11"></span>
        <span class="title">{{fxsInfo.ftitle_store}}</span>
      </div>
      <div v-if="fxsInfo.show_qrcode" class="action" @click="_show_qrcode()">
        <span class="icon-action icon2_12"></span>
        <span class="title">二维码</span>
      </div>
      <div
        @click="Jump('fxsDirector')"
        v-if="fxsInfo.show_highLevel && fxsInfo.superior_user_id"
        class="action"
      >
        <span class="icon-action icon2_13"></span>
        <span class="title">{{fxsInfo.ftitle_superior}}</span>
        <span class="subtitle">{{fxsInfo.superior_user}}</span>
      </div>
      <div @click="Jump('fxCard')" v-if="fxsInfo.show_fx_card" class="action">
        <span class="icon-action icon2_16"></span>
        <span class="title">我的名片</span>
      </div>
      <div v-if="fxsInfo.show_fx_apply" class="action" @click="showFxsEwm()">
        <span class="icon-action icon2_12"></span>
        <span class="title">{{fxsInfo.ftitle_agent_apply}}</span>
      </div>
      <!-- 十二季 秒杀佣金 start -->
      <div v-if="fxsInfo.is_sej_dz"  @click="handleLinkTo('twelveSeckillList')" class="action">
        <span class="icon-action icon2_34"></span>
        <span class="title">秒杀佣金</span>
      </div>
      <!-- 十二季 秒杀佣金 end -->
      <!-- 定制 贵州己乐识界信息科技 分红奖励 start v-if="fxsInfo.is_fhjl"  -->
      <div @click="handleLinkTo('jljsBonus')" v-if="fxsInfo.is_fhjl" class="action">
        <span class="icon-action jlsj_1"></span>
        <span class="title">分红奖励</span>
      </div>
      <!-- 定制 贵州己乐识界信息科技 分红奖励 end  -->
      <!-- 定制  分红奖励 start "  -->
      <div @click="handleLinkTo('dzFenHong')" v-if="fxsInfo.is_five_bonus_dz" class="action">
        <span class="icon-action jlsj_1"></span>
        <span class="title">分红奖励</span>
      </div>
      <!-- 定制  分红奖励 end  -->
      <div @click="handleLinkTo('shareSelect')" v-if="fxsInfo.showShareLinkFxs" class="action">
        <span class="icon-action icon20_1_fx"></span>
        <span class="title">万能链接</span>
      </div>
      <!-- 视频号数据 -->
      <div @click="Jump('venderOrder', 'live')" class="action" v-if="fxsInfo.show_video_num_data_fxs">
        <span class="icon-action icon_sphsj"></span>
        <span class="title">视频号数据</span>
      </div>
      <!-- 自定义项 -->
      <div v-if="fxsInfo.dataset_fxs && fxsInfo.dataset_fxs.length>0"
            v-for="(item,index) in fxsInfo.dataset_fxs"
            :key="index"
            class="action">
        <a @click="JumpUrl(item.link)">
          <span class="icon-action"
                :style="{backgroundImage: 'url('+item.pic+')',backgroundSize:'cover'}"></span>
          <span class="title">{{item.showtitle}}</span>
        </a>
      </div>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import small from '@/smallapp/small'
import { openPage } from '@/utils/utils.js'
export default Vue.extend({
  props: {
    fxsInfo: {
      type: Object
    }
  },
  data() {
    return {
      // 子容
      is_zrkj_dz: false,
    }
  },
  methods: {
    Jump(url, type) {
      const data = { type }
      this.$JumpPath(this, url, data)
    },
    JumpUrl(url) {
      openPage(url)
    },
    handleLinkTo(url, data) {
      this.$JumpName(this, url, data)
    },
    _show_qrcode() {
      this.$emit('showQrcode')
    },
    showFxsEwm() {
      this.$emit('showFxsEwm')
    }
  },
  created() {
    let shop = small.globalData.shopId
    // 子容
    const is_zrkj_dz = this.$_shop('$_zrkj_dz', shop)
    this.is_zrkj_dz = is_zrkj_dz
  }
})
</script>

<style lang="scss">
@import 'src/styles/user/index.scss';
</style>
